package seqlist.leetcode;

public class leetcode27 {
    public int removeElement(int[] nums, int val){
        int fir=0;
        int sec=0;
        while (sec<nums.length){
            if (nums[sec]!=val){
                nums[fir]=nums[sec];
                fir++;
                sec++;
            }else {
                sec++;
            }
        }
        return fir;
    }
}
